]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Replace anchor point by translation and pivot point
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 26 Jun 2020 18:54:32 +0000 (15:54 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 26 Jun 2020 21:03:57 +0000 (21:03 +0000)
Anchor point is deprecated and will eventually be removed from
Mutter's Clutter. Replace them by a combination of pivot point
and translation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1334

js/ui/layout.js
js/ui/magnifier.js
js/ui/panel.js

index 9013aa97bd37188355f280d4136f200aa335cd65..4cd0665824f8cab49f9aaa938cc294a72aba6ba8 100644 (file)
@@ -1204,7 +1204,8 @@ class HotCorner extends Clutter.Actor {
 
             if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
                 this._corner.set_position(this.width - this._corner.width, 0);
-                this.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
+                this.set_pivot_point(1.0, 0.0);
+                this.translation_x = -this.width;
             } else {
                 this._corner.set_position(0, 0);
             }
index 692cb102224d38a963ff1418390aee7330aca40d..eae7bf46428baa6052cf2de8770765634587feb8 100644 (file)
@@ -489,7 +489,10 @@ var Magnifier = class Magnifier {
     _updateMouseSprite() {
         this._updateSpriteTexture();
         let [xHot, yHot] = this._cursorTracker.get_hot();
-        this._mouseSprite.set_anchor_point(xHot, yHot);
+        this._mouseSprite.set({
+            translation_x: -xHot,
+            translation_y: -yHot,
+        });
     }
 
     _updateSpriteTexture() {
index 8f7dc95c04142af11d2611d51a098bab686f959b..90aea8dad369b035308b6559d13d6bce541b1842 100644 (file)
@@ -675,7 +675,7 @@ class PanelCorner extends St.DrawingArea {
         let borderWidth = node.get_length('-panel-corner-border-width');
 
         this.set_size(cornerRadius, borderWidth + cornerRadius);
-        this.set_anchor_point(0, borderWidth);
+        this.translation_y = -borderWidth;
     }
 });